package cn.lynch.bbs.web.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.commons.beanutils.ConvertUtils;

import cn.lynch.bbs.domain.TopicType;
import cn.lynch.bbs.util.converter.EnumBeanUtilConverter;

public class SystemInitializeListener implements ServletContextListener {

    public void contextInitialized(ServletContextEvent evt) {
    	registerConverter();
    }
    
    private void registerConverter() {
    	
    	ConvertUtils.register(new EnumBeanUtilConverter(TopicType.NORMAL, true), TopicType.class);
    	
    	
    }
    
    
    public void contextDestroyed(ServletContextEvent evt) {
    	
    }
	
}
